package com.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Controller表示IndexController的实例是一个控制器
 * @Controller相当于@Controller("indexController") 或者@Controller(value = "indexController")
 */
@Controller
@RequestMapping(value = "/index", method = RequestMethod.GET, params = {"age!18"})
public class IndexController {

    @RequestMapping("/login")
    public String login() {

        return "login";
    }

    @RequestMapping("/register")
    public String register() {
        return "register";
    }
}
